package com.thssh.ui.lsn08;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import com.thssh.ui.R;
import com.thssh.ui.lsn08.view.SearchView;

public class Lsn08Activity extends AppCompatActivity {

    private SearchView search_view;
    private EditText et_query;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getSupportActionBar().setTitle(R.string.des_lsn08);
        setContentView(R.layout.activity_lsn08);
        search_view = (SearchView) findViewById(R.id.search_view);
        et_query = (EditText) findViewById(R.id.et_query);
        et_query.requestFocus();
    }

    public void openClick(View view) {
        search_view.open();
        et_query.setVisibility(View.VISIBLE);
    }

    public void closeClick(View view) {
        search_view.close();
        et_query.setVisibility(View.INVISIBLE);
    }
}
